<?php

namespace app\common\model\mysql;

use think\Model;

class BaseModel extends Model
{
    public function getSelect($where=[],$field=false)
    {
//        try {

            return $this->where($where)->field($field)->select();
//        }catch (\Exception $e){
//            return false;
//        }
    }

    public function insertNewData($data)
    {
        try {
            $this->save($data);
        }catch (\Exception $e){
            return false;
        }
        return $this->id;
    }

    public function updateNewData($data,$where)
    {
        try {
             $this->update($data,$where);
        }catch (\Exception $e){
            return false;
        }
        return true;
    }


}